package com.ruoyi.member.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.member.mapper.FamilyMemberVideoMapMapper;
import com.ruoyi.member.domain.FamilyMemberVideoMap;
import com.ruoyi.member.service.IFamilyMemberVideoMapService;

/**
 * 家庭成员与视频映射Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-30
 */
@Service
public class FamilyMemberVideoMapServiceImpl implements IFamilyMemberVideoMapService 
{
    @Autowired
    private FamilyMemberVideoMapMapper familyMemberVideoMapMapper;

    /**
     * 查询家庭成员与视频映射
     * 
     * @param id 家庭成员与视频映射主键
     * @return 家庭成员与视频映射
     */
    @Override
    public FamilyMemberVideoMap selectFamilyMemberVideoMapById(Long id)
    {
        return familyMemberVideoMapMapper.selectFamilyMemberVideoMapById(id);
    }

    /**
     * 查询家庭成员与视频映射列表
     * 
     * @param familyMemberVideoMap 家庭成员与视频映射
     * @return 家庭成员与视频映射
     */
    @Override
    public List<FamilyMemberVideoMap> selectFamilyMemberVideoMapList(FamilyMemberVideoMap familyMemberVideoMap)
    {
        return familyMemberVideoMapMapper.selectFamilyMemberVideoMapList(familyMemberVideoMap);
    }

    /**
     * 新增家庭成员与视频映射
     * 
     * @param familyMemberVideoMap 家庭成员与视频映射
     * @return 结果
     */
    @Override
    public int insertFamilyMemberVideoMap(FamilyMemberVideoMap familyMemberVideoMap)
    {
        familyMemberVideoMap.setCreateTime(DateUtils.getNowDate());
        return familyMemberVideoMapMapper.insertFamilyMemberVideoMap(familyMemberVideoMap);
    }

    /**
     * 修改家庭成员与视频映射
     * 
     * @param familyMemberVideoMap 家庭成员与视频映射
     * @return 结果
     */
    @Override
    public int updateFamilyMemberVideoMap(FamilyMemberVideoMap familyMemberVideoMap)
    {
        familyMemberVideoMap.setUpdateTime(DateUtils.getNowDate());
        return familyMemberVideoMapMapper.updateFamilyMemberVideoMap(familyMemberVideoMap);
    }

    /**
     * 批量删除家庭成员与视频映射
     * 
     * @param ids 需要删除的家庭成员与视频映射主键
     * @return 结果
     */
    @Override
    public int deleteFamilyMemberVideoMapByIds(Long[] ids)
    {
        return familyMemberVideoMapMapper.deleteFamilyMemberVideoMapByIds(ids);
    }

    /**
     * 删除家庭成员与视频映射信息
     * 
     * @param id 家庭成员与视频映射主键
     * @return 结果
     */
    @Override
    public int deleteFamilyMemberVideoMapById(Long id)
    {
        return familyMemberVideoMapMapper.deleteFamilyMemberVideoMapById(id);
    }
}
